#ifndef __VMRPLAYERVIEWCONTROLLER_H__
#define __VMRPLAYERVIEWCONTROLLER_H__

#include <string>
#include <MFramework\NCenter.h>

#include "ViewController.h"
#include "LoadManager.h"
#include "VMRPlayerScrollView.h"

class VMRPlayer;
class VMRPlayerView;
class MRect;
class DXButtonView;
class DXImage;
class VMRPlayerScrollView;

class VMRPlayerViewControllerDelegate
{
public:
	virtual void didCloseVideo( IParam* param ) = 0;
};

class VMRPlayerViewController :	public ViewController, VMRPlayerScrollViewDelegate
{
public:
									VMRPlayerViewController( MRect&rect, std::wstring fileURL );
									~VMRPlayerViewController();
	
	void							play( IParam* param );
	void							pause( IParam* param );
	void							exit( IParam* param );
	
	/*VMRPlayer*/View*					view();
	VMRPlayer*						vmrPlayer();

	VMRPlayerViewControllerDelegate* delegate;
	
	// VMRPlayerScrollViewDelegate methods
	void							scrollChangedPosition( void* param );
	void							playButtonPressed( void* param );
	void							pauseButtonPressed( void* param );
private:
	VMRPlayer*						_vmrPlayer;
	
	DXButtonView*					_backButton; 
	
	LoadManager< DXImage >			_imageManager;

	VMRPlayerScrollView*			_scrollView;
};

#endif